{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# Stability Experiments for Backward Euler"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as pt"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "We'll integrate\n",
        "\n",
        "$$ y'=\\alpha y$$\n",
        "\n",
        "with $y'(0) = 1$,\n",
        "\n",
        "using Backward Euler."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Here are a few parameter settings that exhibit different situations that can occur:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 23,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "#alpha = -1; h = 0.1; final_t = 20\n",
        "#alpha = -1; h = 1; final_t = 20\n",
        "alpha = -1; h = 1.5; final_t = 20\n",
        "#alpha = 1; h = 0.1; final_t = 20\n",
        "#alpha = 1; h = 2; final_t = 20"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "We specify the right-hand side and the initial condition:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 24,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "t_values = [0]\n",
        "y_values = [1]\n",
        "\n",
        "def f(y):\n",
        "    return alpha * y"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Integrate in time using Forward Euler:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 25,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "while t_values[-1] < final_t:\n",
        "    t_values.append(t_values[-1] + h)\n",
        "    y_values.append(y_values[-1]/(1-h*alpha))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "And plot:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 26,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<matplotlib.legend.Legend at 0x7ff0c4fbdef0>"
            ]
          },
          "execution_count": 26,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHoFJREFUeJzt3XmQlPW97/H3t2eBAYZhgGGRZdgEAhFQElyuN0yCAsdL\nieREoikveMqyOG6J92odvFZKhiSnSk9OJTFuiTcmRtFwRFwwhojbuORGMSIubIMgwyoCM8M6A7P8\n7h/dDM1Md093z9P751XVNdNPP8vPx/YzP7+/3/M85pxDRESyiy/VDRAREe8p3EVEspDCXUQkCync\nRUSykMJdRCQLKdxFRLJQp+FuZo+Z2X4z+yTCOr82s61mtt7MpnjbRBERiVU0Pfc/ALPCfWhm/wSM\nds6dCywCfuNR20REJE6dhrtz7l2gLsIqc4EnAuu+D5SY2UBvmiciIvHwouY+BNgV9H5PYJmIiKSI\nF+FuIZbpngYiIimU78E+dgPDgt4PBfaGWtHMFPoiInFwzoXqSIcVbc/dCN1DB1gFLAAws4uAeufc\n/ggN1Ms5lixZkvI2pMtL50LnQuci8isenfbczexpoALoZ2Y7gSVAoT+n3aPOub+Y2RVm9jlwHPiX\nSPs7eRK6dYurrSIiEqVOw90594Mo1rk12gNu2wYTJkS7toiIxCPpV6hWVyf7iOmpoqIi1U1IGzoX\nZ+hcnKFz0TUWbz0nroOZuXvvdSxenLRDiohkPDPDxTig6sVsmZhsrG4Euif7sCKShkaMGEFNTU2q\nm5E2ysvL2bFjhyf7Snq4b/qiDhic7MOKSBqqqamJezZINjKLqXMeUdJr7p/viXQnAxER8ULSw73R\n6qhTvouIJFTSw/2cUXWaMSMikmBJD/ey4Qp3EZFES3q49xlUx5YtyT6qiEjsRo4cyRtvvJHqZsQl\n6eHes7967iKS+VpaWlLdhIiSHu6FvRXuIpL+FixYwM6dO5kzZw69e/fm5z//OT6fj9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I4S4ikoUU7iIiWUjhLiKShRTu\nIiJZSOEuIpKFFO4iIlno/wNYF0ahvO7p1AAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<matplotlib.figure.Figure at 0x7ff0c50a3550>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "mesh = np.linspace(0, final_t, 100)\n",
        "pt.plot(t_values, y_values)\n",
        "pt.plot(mesh, np.exp(alpha*mesh), label=\"true\")\n",
        "pt.legend()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": []
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.1+"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}